import os
import unittest
from cases.Base_Case import BASECASE
from config.config import DATA_PATH
from page.index import IndexPage
from page.医技管理.医技执行.yijizhixing__page import yijizhixing
from tools.sjqd_way import read_data_from_excel
class TestQuxiaoyijizhixing(BASECASE):
    @classmethod
    def setUpClass(cls):
        ap = IndexPage()
        ap.jrym_no1('医技执行')
    @classmethod
    def tearDownClass(cls):
        ap = IndexPage()
        ap.close_all_xxk()
        print("{}执行完毕-------------------------------------------------".format(cls))
    #门诊取消执行医技
    def test_2_quxiaoyijizhixing(self):
        self.data = read_data_from_excel(os.path.join(DATA_PATH, "datas.xls"), "测试患者")
        name = self.data[0][0]
        bp = yijizhixing()
        bp.choose_yizhixing()  # 选择已执行
        bp.click_quanbukeshi_btn()  # 点击全部科室
        bp.input_name(name)#输入姓名
        bp.click_chaxun_btn()#点击查询按钮
        bp.hz1.Refind()
        bp.huanzhe1.Refind()
        bp.choose_hz1()#选择患者1
        bp.click_quxiaozhixing_btn()#点击取消执行
        bp.click_qxzxyes_btn()#点击确定按钮
if __name__ == '__main__':
    unittest.main()

